{% extends 'PortalMainBundle::layout.html.twig' %}

{% block stylesheets %}
  {{ parent() }}
<style>
        .unread{
            font-weight: bold;
        }
    </style>
{% endblock %}
{% block content %}


    <div class="topSpace row-fluid">
        <h3 class="heady">Захидал</h3>
        <ul class="nav nav-tabs version1">
            <li class="active"><a href="#tab1" data-toggle="tab">Ирсэн</a></li>
            <li class=""><a href="{{path('message_outbox')}}">Илгээсэн</a></li>
            <li class=""><a href="#tab3" data-toggle="tab">Устгасан</a></li>
        </ul>
        <div class="tab-content version1">
            <div class="tab-pane active" id="tab1">


                <div class="span12 ">
                    <div class="pretty-table">
                        <table style="width: 100%">
                            <thead>
                                <tr>
                                    <th>№</th>
                                    <th>Нэр</th>
                                    <th>Гарчиг</th>
                                    <th>Огноо</th>
                                </tr>
                            </thead>
                            <tbody>
     {% set counter = 1 %}
     {% for mail in mailArray %}
                                    <tr>
                                        <td><input type="checkbox" name="checkbox[]" value="{{mail.ID}}" /></td>
                                        <td><a href="{{path('message_show', {'id': mail.ID})}}" class="{% if mail.STATUS_RECEIVER == 'unread' %} unread{% endif %}">{{ mail.FIRST_NAME }}</a></td>
                                        <td class="{% if mail.STATUS_RECEIVER == 'unread' %} unread{% endif %}">{{ mail.TITLE }}</td>
                                        
                                        <td class="{% if mail.STATUS_RECEIVER == 'unread' %} unread{% endif %}">{{ mail.CREATED_AT }}</td>
                                    </tr>
      {% set counter = counter + 1 %}                    
      {% else %}
                                    <tr>
                                        <td colspan="5">Хоосон</td>
                                    </tr>
     {% endfor %}   
                                </tbody>
                            </table>
                        </div>
                    </div>

                </div> 
                <div class="tab-pane" id="tab2">Pellentesque habitant morbi tristique senectus et netus et fames ac turpis egestas. Maecenas venenatis rhoncus luctus. Mauris vel elit a metus adipiscing mattis. Aliquam feugiat libero a est porttitor ultrices quis in dolor. Fusce venenatis feugiat est, eget rhoncus enim viverra ac. Praesent aliquam tristique ipsum, nec posuere sapien pulvinar vel. Suspendisse potenti. Proin vehicula cursus rhoncus. Nulla amet cursus tincidunt, nulla sem sodales magna.</div> 
                <div class="tab-pane" id="tab3">Nunc ultrices ipsum in augue adipiscing fermentum. Mauris eget neque est, et rutrum diam. Praesent tincidunt iaculis arcu, eu tincidunt erat tincidunt vitae.</div> 
            </div>
        </div>
{% endblock %}